<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('index')}">产品列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="get" action="{:url('index')}">
			关键字:
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{:input('request.keyword/s','')}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered margin-top-20">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>公司名称</th>
					<th>注册时间</th>
					<th>成本</th>
					<th>类型</th>
					<th>区域</th>
					<th>结束时间</th>
					<th>售价</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$vo.reg_time|date="Y-m-d",###}</td>
					<td>{$vo.cost}</td>
					<td>
						<switch name="vo.type">
							<case value="1">内资</case>
							<case value="2">外资</case>
							<case value="3">中外合资</case>
						</switch>
					</td>
					<td>{$vo.area}</td>
					<td>{$vo.end_time|date="Y-m-d",###}</td>
					<td>{$vo.price}</td>
					<td>
						<switch name="vo.turnover">
							<case value="0">未转让</case>
							<case value="1">转让中</case>
							<case value="2">完成</case>
						</switch>
					</td>
					<td>
						<eq name="vo.turnover" value="0">
								<if condition="auth_check('restore')"><a href="{:url('restore',['id' => $vo['id']])}" class="js-ajax-dialog-btn" data-msg="是否确定还原？">还原 </a></if>
							<eq name="vo.type" value="1">
								<if condition="auth_check('conversion')"><a href="{:url('conversion',['id' => $vo['id']])}" class="js-ajax-dialog-btn" data-msg="是否确定转化为材料？">转化 </a></if>
							</eq>
							<if condition="auth_check('transfer')"><a href="{:url('transfer',['id' => $vo['id']])}" class="js-ajax-dialog-btn" data-msg="是否进行转让？">转让 </a></if>
						<else/>
							<eq name="vo.turnover" value="1">
								<if condition="auth_check('turnover')"><a href="{:url('turnover',['id' => $vo['id']])}" class="js-ajax-dialog-btn" data-msg="是否转让完成？">完成 </a></if>
							</eq>
						</eq>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}
			<li><a>共计 {$lists->total()} 条</a><li>
				<input class="page" type="text" name="pageNum" value="{$lists->getCurrentPage()}"/>
				<a class="topage" data-url="{$lists->getCurrentPath()}">跳转</a>
			</li></li>
		</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>